Hệ thống bổ nhiệm bác sĩ trong PHP bằng mã nguồn

1 <?php session_start(); ?>
2 <?php include(
'header.php'); ?>
3
4
5
6
7
8     <!--
this is for donor registraton -->
9     <div
class="login" style="background-color:#fff;">
10         <h3
class="text-center" style="background-color:#272327;color: #fff;">Donor/Seeker Login</h3>
11             <div
class="formstyle" style="float: right;padding:20px;border: 1px solid lightgrey;margin-right:415px; margin-bottom:30px;background-color: #101011;color: #0d0623;">
12                 <form action=
"" method="post" class="text-center form-group">
13                     <label>
14                         Email: <input type=
"email" name="email" placeholder="email" required>
15                     </label><br><br>
16                     <label>
17                         Password: <input type=
"password" name="password" placeholder="password" required>
18                     </label><br><br>
19                     <button name=
"submit" type="submit" style="margin-left:36px;width: 85px;border-radius: 3px;">Login</button> <br>
20
21                     <span style=
"color:#fff;">Not a member yet?</span> <a href="DonorSeekerReg.php" title="create a account" target="" style="color:#fff;">&nbsp;Sign Up</a> <br>
22
23
24                     <!-- login validation -->
25             <?php
26                     $_SESSION[
'donorstatus']="";
27                             
28                 
if(isset($_POST["submit"])){
29
30                             include(
'config.php');
31
32                             $sql=
"SELECT * FROM registration WHERE email= '" . $_POST["email"]."' AND password= '" . $_POST["password"]."'";
33
34                             $result = $conn->query($sql);
35
36                                     
if ($result->num_rows > 0) {
37                                             $_SESSION[
"email"]= $_POST["email"];
38                                             $_SESSION[
"donar_id"]= $_POST["donar_id"];
39                                             $_SESSION[
'donorstatus']= "yes";
40                                             echo
"<script>location.replace('donor/dashboard.php');</script>";
41                                                 
// echo "u are supposed to redirect to ur profile";
42                                         }
else {
43                                             echo
"<span style='color:red;'>Invalid username or password</span>";
44                                         }
45                         $conn->close();
46                     }
47                     
48             ?>
49         <!-- login validation End-->
50
51
52                 </form> <br>&nbsp;&nbsp;&nbsp;
53                 
54                 <br>
55
56                 
57         
58                 
59             
60         
61     </div>
62     
63     
64 </div>
65     
66  <?php include(
'footer.php'); ?>
67
68
69     
70     </div><!-- containerFluid Ends -->
71
72
73
74
75     <script src=
"js/bootstrap.min.js"></script>
76
77
78  
79             
80
81
82
83     
84 </body>
85 </html>


Gõ tìm kiếm nhanh...